import React, { createContext, useContext, useState } from "react";
export const RouterContext = createContext<any>(null);

export const RouterContextProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => {
	const [currentRoute, setCurrentRoute] = useState(null);
	return (
		<RouterContext.Provider
			value={{
				currentRoute,
				setCurrentRoute
			}}
		>
			{children}
		</RouterContext.Provider>
	);
};
